Skip to content

fix(ux): Show full channel name on hover#38320

Merged
dionisio-bot[bot] merged 4 commits intoRocketChat:developfrom
tushargr0ver:fix-38316-sidebar-tooltip
Feb 27, 2026
Merged

fix(ux): Show full channel name on hover#38320
dionisio-bot[bot] merged 4 commits intoRocketChat:developfrom
tushargr0ver:fix-38316-sidebar-tooltip

Conversation

@tushargr0ver
Copy link
Copy Markdown
Contributor

@tushargr0ver tushargr0ver commented Jan 24, 2026

Proposed changes (including videos or screenshots)

Currently, long channel names in the sidebar are truncated with an ellipsis. This PR adds a tooltip (title attribute) to the sidebar items so that the full channel name is visible on hover.

Video Evidence

sidebar-channel-hover-tooltip.webm

Issue(s)

Closes #38316

Steps to test or reproduce

  1. Create a channel with a very long name (e.g., 'this-is-a-very-long-channel-name-to-test-sidebar-tooltips').
  2. Observe the name being truncated in the sidebar.
  3. Hover the mouse over the truncated name.
  4. Verify that the full name appears in a tooltip.

Further comments

This is a small UX improvement to help users identify channels with similar prefixes.

Summary by CodeRabbit

  • Refactor
    • Improved internal prop handling consistency across sidebar item components to ensure proper data flow to child components.

COMM-144
Task: COMM-140

@tushargr0ver tushargr0ver requested a review from a team as a code owner January 24, 2026 12:59
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 24, 2026

⚠️ No Changeset found

Latest commit: 19692e7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Jan 24, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 24, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 24, 2026

Walkthrough

Three sidebar item component variants (Condensed, Extended, and Medium) are updated to explicitly pass the title prop to the SidebarV2Item component, enabling tooltip or hover functionality for truncated channel names in the sidebar.

Changes

Cohort / File(s) Summary
Sidebar Item Title Propagation
apps/meteor/client/sidebar/Item/Condensed.tsx, apps/meteor/client/sidebar/Item/Extended.tsx, apps/meteor/client/sidebar/Item/Medium.tsx
Each component now explicitly passes title={title} prop to SidebarV2Item alongside existing props, enabling the underlying component to leverage the title for tooltip/hover display functionality.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

type: feature

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main UX improvement: adding hover tooltips to show full channel names in the sidebar.
Linked Issues check ✅ Passed The code changes (adding title prop to sidebar item components) directly implement the core requirement from issue #38316 to display full channel names on hover via tooltips.
Out of Scope Changes check ✅ Passed All three modified sidebar item files (Extended, Medium, Condensed) focus exclusively on passing the title prop to enable tooltips, staying within the scope of issue #38316.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

@dodaa08
Copy link
Copy Markdown
Contributor

dodaa08 commented Jan 24, 2026

Tested the PR locally it's showing the name on hover in sidebar, but try using the default PR template / be more descriptive or add a video, might increase the chances of it being reviewed and make it easy for maintainers as well.

@tushargr0ver
Copy link
Copy Markdown
Contributor Author

Summarise pr @coderabbitai

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 25, 2026

Tip

For best results, initiate chat on the files or code changes.

@tushargr0ver, here's a summary of your PR:

Summary

Problem: Long channel names in the sidebar were truncated without any way to see the full name on hover, requiring users to click into channels to identify them (issue #38316).

Solution: Added the title attribute to sidebar items across all three sidebar modes (Extended, Medium, and Condensed) to display the full channel name as a tooltip on hover.

Changes Made:

  • Modified Components (3 files):

    • apps/meteor/client/sidebar/Item/Extended.tsx
    • apps/meteor/client/sidebar/Item/Medium.tsx
    • apps/meteor/client/sidebar/Item/Condensed.tsx

    Each file now conditionally passes title={typeof title === 'string' ? title : undefined} to SidebarV2ItemTitle, ensuring string titles are available as HTML title attributes for tooltips.

  • Testing: Added E2E test in apps/meteor/tests/e2e/sidebar.spec.ts to verify the tooltip functionality.

  • Changeset: Created .changeset/short-names-visible.md for release notes documenting this patch.

Verification: Successfully tested locally by @dodaa08 - confirmed that hovering over sidebar items now shows the full channel name.

This is a small UX improvement that reduces unnecessary clicks and improves channel discoverability, especially for descriptive/long channel names.

@dougfabris dougfabris changed the title fix(sidebar): Show full channel name on hover fix(ux): Show full channel name on hover Feb 23, 2026
Copy link
Copy Markdown
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to check the type of the param neither the test you added for this small change

@dougfabris dougfabris added the valid A valid contribution where maintainers will review based on priority label Feb 23, 2026
@tushargr0ver tushargr0ver force-pushed the fix-38316-sidebar-tooltip branch from 996bccc to 46c7963 Compare February 24, 2026 15:06
@tushargr0ver
Copy link
Copy Markdown
Contributor Author

Agreed, cleaned it up @dougfabris

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
apps/meteor/client/sidebar/Item/Condensed.tsx (1)

30-32: ⚠️ Potential issue | 🟠 Major

Same ReactNodetitle type-safety issue as Extended.tsx

title is ReactNode (Line 6) but is passed without a string guard to SidebarV2ItemTitle title. Apply the same fix described for Extended.tsx.

🛡️ Proposed fix
-			<SidebarV2ItemTitle unread={unread} title={title}>
+			<SidebarV2ItemTitle unread={unread} title={typeof title === 'string' ? title : undefined}>
 				{title}
 			</SidebarV2ItemTitle>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/client/sidebar/Item/Condensed.tsx` around lines 30 - 32, The
Condensed component is passing a ReactNode prop title directly into
SidebarV2ItemTitle.title which expects a string; add a type guard like in
Extended.tsx so you only pass a string (e.g., titleProp = typeof title ===
"string" ? title : undefined) to SidebarV2ItemTitle (keep the children render
{title} unchanged). Update the usage inside Condensed.tsx to pass the guarded
titleProp to the title attribute of SidebarV2ItemTitle.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@apps/meteor/client/sidebar/Item/Condensed.tsx`:
- Around line 30-32: The Condensed component is passing a ReactNode prop title
directly into SidebarV2ItemTitle.title which expects a string; add a type guard
like in Extended.tsx so you only pass a string (e.g., titleProp = typeof title
=== "string" ? title : undefined) to SidebarV2ItemTitle (keep the children
render {title} unchanged). Update the usage inside Condensed.tsx to pass the
guarded titleProp to the title attribute of SidebarV2ItemTitle.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 996bccc and 46c7963.

📒 Files selected for processing (4)
  • .changeset/short-names-visible.md
  • apps/meteor/client/sidebar/Item/Condensed.tsx
  • apps/meteor/client/sidebar/Item/Extended.tsx
  • apps/meteor/client/sidebar/Item/Medium.tsx
✅ Files skipped from review due to trivial changes (1)
  • .changeset/short-names-visible.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/sidebar/Item/Medium.tsx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/sidebar/Item/Extended.tsx
  • apps/meteor/client/sidebar/Item/Condensed.tsx
🔇 Additional comments (1)
apps/meteor/client/sidebar/Item/Extended.tsx (1)

63-65: title={title} passes ReactNode to a prop expecting string — add type guard for defensive programming

title is typed as ReactNode in ExtendedProps but is passed directly to the title prop of SidebarV2ItemTitle. The HTML title attribute expects a string; passing non-string values will render as [object Object] in the tooltip. This pattern exists in Extended.tsx, Medium.tsx, and Condensed.tsx.

While the exact type signature of SidebarV2ItemTitle.title cannot be verified in this environment (it's from the external @rocket.chat/fuselage package), the defensive fix aligns with best practices for handling ReactNodestring conversions:

- <SidebarV2ItemTitle unread={unread} title={title}>
+ <SidebarV2ItemTitle unread={unread} title={typeof title === 'string' ? title : undefined}>
  	{title}
  </SidebarV2ItemTitle>

Apply this fix to Extended.tsx (line 63), Medium.tsx, and Condensed.tsx.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.68%. Comparing base (86af4e2) to head (19692e7).
⚠️ Report is 44 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38320      +/-   ##
===========================================
- Coverage    70.73%   70.68%   -0.06%     
===========================================
  Files         3195     3195              
  Lines       113105   113105              
  Branches     20510    20535      +25     
===========================================
- Hits         80010    79947      -63     
- Misses       31049    31099      +50     
- Partials      2046     2059      +13     
Flag Coverage Δ
e2e 60.32% <ø> (-0.10%) ⬇️
e2e-api 47.77% <ø> (-0.08%) ⬇️
unit 71.34% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Feb 27, 2026
@dougfabris dougfabris added this to the 8.3.0 milestone Feb 27, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 27, 2026
@dionisio-bot dionisio-bot bot enabled auto-merge February 27, 2026 19:36
@dougfabris dougfabris removed this from the 8.3.0 milestone Feb 27, 2026
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Feb 27, 2026
@coderabbitai coderabbitai bot added the type: feature Pull requests that introduces new feature label Feb 27, 2026
@dougfabris dougfabris removed the type: feature Pull requests that introduces new feature label Feb 27, 2026
@dougfabris
Copy link
Copy Markdown
Member

/jira COMM

@dougfabris dougfabris added this to the 8.3.0 milestone Feb 27, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 27, 2026
@dionisio-bot dionisio-bot bot added this pull request to the merge queue Feb 27, 2026
Merged via the queue into RocketChat:develop with commit dbe69af Feb 27, 2026
76 of 78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: bug valid A valid contribution where maintainers will review based on priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long channel names are truncated and not visible on hover

5 participants